package myInvoke;

import sun.text.resources.hi.JavaTimeSupplementary_hi_IN;

import javax.sound.midi.Soundbank;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyHandler implements InvocationHandler {

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("invoke");
        Object result = null ;
        if(method.getName()=="printInfo") {
            result= new Info("invoke-method");
        }

        return result;
    }
}
